import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home/index.vue'

// import Destination from '../views/Destination.vue'

// import Strategy from '../views/Strategy/index.vue'

import traveler from '../views/traveler/index.vue'
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home,
  },
  {
    path: '/travelarticles',
    name: 'Travelarticles',
    component: () => import('../views/Travelarticles/index.vue'),
  },
  {
    path: '/strategy',
    name: 'Strategy',
    component: () => import('../views/Strategy/index.vue'),
  },
  {
    path: '/destination',
    name: 'Destination',
    component: () => import('../views/Destination.vue'),
  },
  {
    path: '/TravelScenicSpot',
    name: 'TravelScenicSpot',
    component: () => import('../views/TravelScenicSpot.vue'),
  },
  {
    path: '/traveler',
    name: 'Traveler',
    component: () => import('../views/traveler/index.vue'),
  },
  {
    path: '/orderWinehouse',
    name: 'OrderWinehouse',
    component: () => {
      return import('../views/orderWinehouse')
    },
  },
  {
    path: '/loginOrRegist',
    name: 'LoginOrRegist',
    component: () => {
      return import('../views/LoginOrRegist')
    },
    meta: {
      isShow: true,
    },
  },
  {
    path: '/regist',
    name: 'Regist',
    component: () => {
      return import('../views/regist')
    },
    meta: {
      isShow: true,
    },
  },
  {
    path: '/addressDetail',
    name: 'AddressDetail',
    component: () => {
      return import('../views/addressDetail/index.vue')
    },
  },
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes,
  scrollBehavior() {
    return { x: 0, y: 0 }
  },
})

export default router
